package br.com.globalcode.clinicafacil.modelo.service;

import br.com.globalcode.clinicafacil.modelo.entidade.Dentista;

public class AuditorDentistaService 
				extends DentistaService {
	
	private DentistaService service;
	
	public AuditorDentistaService() {
	}
	
	public AuditorDentistaService( DentistaService service) {
		this.service = service;
	}
	
	@Override
	public void save(Dentista dentista) {
		
		long start = System.currentTimeMillis(); 
		
		if (service==null)
			super.save(dentista);
		else 
			service.save(dentista);
		
		long end = System.currentTimeMillis();  
		
		System.out.println( ( end - start ) +  " ms total de execucao "  );	
		
	}
	

}
